<h2>Order management</h2>
<table>
    <legend>Available</legend>
    <tr>
        <th>ID</th>
        <th>TABLE</th>        
        <th>Action</th>        
    </tr>
    <?php foreach ($this->available as $key => $table): ?>
        <tr>
            <td><?php print $table->id; ?></td>
            <td><?php print $table->label; ?></td>
            <td><?php print a("Add menu", "/order/addOrder", array('tid' => $table->id)); ?></td>
        </tr>
    <?php endforeach ?>
</table>
<table>
    <legend>Occupied</legend>
    <tr>
        <th>ID</th>
        <th>TABLE</th>        
    </tr>
    <?php foreach ($this->occupied as $key => $table): ?>
        <tr>
            <td><?php print $table->id; ?></td>
            <td><?php print $table->label; ?></td>
            <td>
                <?php print a('Resume','/order/resume',array('tid' => $table->id))?> | 
                <?php print a('Add order','/order/addOrder',array('tid' => $table->id))?> |
                <?php print a('Addition','/order/addition',array('tid' => $table->id))?> |
            </td>
        </tr>
    <?php endforeach ?>
</table>
<table>
    <legend><?php print t('historic')?></legend>
    <tr>
        <th>ID</th>
        <th>TABLE</th>        
        <th>TOTAL</th>        
    </tr>
    <p>Todays order</p>
    
    <?php foreach ($this->payed as $key => $table): ?>
        <tr>
            <td><?php print $table->table_id; ?></td>
            <td><?php print $table->table_label; ?></td>
            <td><?php print $table->total; ?></td>

        </tr>
    <?php endforeach ?>
    
</table>


